<template>
	<view class="h-full text-white">
		<lz-navbar title="BTCMax" :autoBack="true" leftIcon="arrow-left"></lz-navbar>
		<view class="p-4 flex items-center justify-between">
			<view class="relative"  style="width: 50px;height: 50px;">
				<image src="/static/images/zichan/7.png" style="width: 100%;height: 100%;"></image>
				<view class="absolute right-2 bottom-0">
					<u-icon name="checkmark-circle-fill" color="#00a100" size="16"></u-icon>
				</view>
			</view>
			<view class="text-lg font-bold">fdunpay@gmail.com</view>
			<u-icon name="arrow-right" color="#9FA6B5" size="16"></u-icon>
		</view>
		<u-gap height="4" bgColor="#000"></u-gap>
		<view class="text-xl p-4">{{$t('wode.changyonggongn')}}</view>
		<view class="flex flex-wrap gap-12 py-8 p-2">
			<view v-for="(item,index) in iconList" :key="index" class="flex justify-center items-center flex-col" style="width: 210rpx;height: 80px;" 
			@click="navigatorTo(item)">
				<image :src="item.icon" style="height: 26px;width: 26px;"></image>
				<view class="mt-1">{{item.name}}</view>
			</view>
		</view>
		<view class="p-8">
			<u-button :text="$t('wode.tuichudenglu')" color="#212121" @click="loginOut"></u-button>
		</view>
	</view>
</template>

<script>
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	export default {
		computed: {
			...mapGetters(['userInfo', 'api', 'config']),
		},
		data() {
			return {
				iconList:[
					{name:this.$t('wode.wodeweituo'),icon:'/static/images/wode/1.png',path:'/pages/tabBar/zichan/zichan'},
					{name:this.$t('wode.anquanzhongxing'),icon:'/static/images/wode/2.png',path:'/pages/template/safe/safe'},
					{name:this.$t('wode.xiaoxitongzhi'),icon:'/static/images/wode/3.png',path:'/pages/template/notice/notice'},
					{name:this.$t('wode.guanyuwome'),icon:'/static/images/wode/4.png',path:'/pages/template/aboutUs/aboutUs'},
					{name:this.$t('wode.shezhi'),icon:'/static/images/wode/5.png',path:'/pages/template/accountSettings/accountSettings'},
					{name:this.$t('wode.kefu'),icon:'/static/images/wode/6.svg',path:'/pages/template/onservice/onservice'},
				],
			}
		},
		onLoad(op) {},
		onReady() {},
		methods: {
			navigatorTo(item){
				if(item.path=='/pages/tabBar/zichan/zichan'){
					uni.switchTab({
						url: item.path,
						success: res => {},
						fail: () => {},
						complete: () => {}
					});
				}else{
					uni.navigateTo({
						url: item.path,
						success: res => {},
						fail: () => {},
						complete: () => {}
					});
				}
				
			},
			// 退出登录
			loginOut(){
				uni.showModal({
					content: this.$t('wode.quedengyaotuichu'),
					cancelColor:'#999',
					success: function (res) {
						if (res.confirm) {
							uni.navigateTo({
								url: '/pages/template/login/login',
								success: res => {},
								fail: () => {},
								complete: () => {}
							});
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	
</style>